namespace Service.Repository
{

    /// <summary>
    /// 
    /// </summary>
    public interface IDelete
    {
        /// <summary>
        /// 是否删除
        /// </summary>
        bool IsDelete { get; }
    }



    /// <summary>
    /// 实体 不带主键
    /// </summary>
    public interface IEntity
    {

    }

    /// <summary>
    ///  实体 带固定字段
    /// </summary>
    /// <typeparam name="TKey"></typeparam>
    public interface IEntity<TKey> : IEntity, IDelete
    {

        /// <summary>
        /// Id
        /// </summary>
        TKey Id { get; }

        /// <summary>
        /// 创建时间
        /// </summary>
        DateTime CreateTime { get; }

        /// <summary>
        /// 修改时间
        /// </summary>
        DateTime? UpdateTime { get; }

        /// <summary>
        /// 删除时间
        /// </summary>
        DateTime? DeleteTime { get; }

        ///// <summary>
        ///// 是否删除
        ///// </summary>
        //bool IsDelete { get; }

        /// <summary>
        /// 创建人id
        /// </summary>
        long CreateById { get; }

        /// <summary>
        /// 删除人id
        /// </summary>
        long? DeleteById { get; }

        /// <summary>
        /// 最后修改人id
        /// </summary>
        long? UpdateById { get; }

    }
}